import { Component, OnInit, Inject, ChangeDetectionStrategy } from '@angular/core';
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
@Component({
  selector: 'app-newproject',
  templateUrl: './newproject.component.html',
  styleUrls: ['./newproject.component.scss'],
  //ChangeDetectionStrategy.OnPush 不用检查当前组件树是否变化  除非 你告诉我  手动设置
  changeDetection:ChangeDetectionStrategy.OnPush
})
export class NewprojectComponent implements OnInit {
  title:string = "";

  constructor(@Inject(MAT_DIALOG_DATA) private data:any,private dialogRef:MatDialogRef<NewprojectComponent>) { }

  ngOnInit() {
    this.title = this.data.title;
    console.log(JSON.stringify(this.data))
  }

  heandClick(){
    this.dialogRef.close("新建项目回传信息")


  }

}
